#include <iostream>
using namespace std;


int main(){
    int num;
    cin >> num;
    int ans = 0;
    while(num){
        ans += num % 2;
        num /= 2;
    }
    cout << ans << endl;
    return 0;
}